<div>
<h1> <%= @event.name %> </h1>
</div>
<br>
<div class="mainEventImg">
<%= image_tag("/events/#{@event.image_url}") %>
</div>


<br>

<div>
<hr style="clear:both;"/>
<h3 class="tit"> Description </h3>
<p> <%= @event.description %> </p>
</div>

<div>
<hr style="clear:both;"/>
<h3 class="tit"> Location </h3>
<p> <%= @event.location %> </p>
</div>



<div>
<hr style="clear:both;"/>
<h3 class="tit"> Photo-gallery </h3>
  <div class="gridList">
    <% @images.each do |image| %>
        <div class="gridBox" class="flex">

          <script src="/hbc-progetto-hypermedia-applications/app/assets/javascripts/jquery-1.10.2.min.js"></script>
          <script src="/hbc-progetto-hypermedia-applications/app/assets/javascripts/lightbox-2.6.min.js"></script>

          <%= link_to image_tag("/events/#{image.image_url}"), "/events/#{image.image_url}", :rel => "lightbox" %>

        </div>
    <% end  %>
  </div>
</div>

<br>
<br>

<div>
  <hr style="clear:both;"/>
  <h3> Exposed products </h3>
  <%= link_to "Look at #{@event.name} exposed products", exposed_products_event_path(@event) %>
</div>

<div id="backLink">

  <div id="imageBack">
  <%= link_to :back do%>
    <%= image_tag("/back.png") %>
  <% end %>
  </div>
  <% if(@from!=nil) %>
  <div id="textBack">
    Back to all event list
  </div>
  <% else %>
  <div id="textBack">
    Back to product
  </div>
  <% end %>

</div>